package cn.edu.uestc.controller;

import cn.edu.uestc.pojo.User;
import cn.edu.uestc.service.SignupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class SignupController {
    @Autowired
    SignupService signupService;

    @PostMapping("sign_up")
    public boolean signup(User user) {
        return signupService.signup(user);
    }

    @GetMapping("get_all_operators")
    public List<String> getAllOperators() {
        return signupService.getAllOperators();
    }
}
